
#ifndef LOD_TCVERTEX_H
#define LOD_TCVERTEX_H

#include "cvertex.h"
#include "tv_iface.h"

//! Coloured triangles-aware vertex
template<class co_type, class comp_type, class it_type>
class tcvertex : public cvertex<co_type, comp_type>, public tv_iface<it_type>
{
    public:

    /*! 
     * \param c Vertex's coordinates
     * \param n Normal vector of the vertex
     * \param colour Vertex's colour */
    tcvertex(const co_type* c, const co_type* n, const comp_type* colour)
     : cvertex<co_type,comp_type>(c, n, colour)
    {
    }

    tcvertex()
    {
    }


    /*!
     * \param tcv A coloured triangles-aware vertex to compare this one with. */
    bool operator== (const tcvertex & tcv) const
    {
        return ((cvertex<co_type,comp_type>*)this)->operator==(tcv) &&
               ((tv_iface<it_type>*)this)->operator==(tcv);
    }
};

#endif // LOD_TCVERTEX_H
